package com.bskj.kuaifu.service;

import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.alibaba.fastjson.JSONObject;
import com.bskj.common.bean.model.PayInfo;
import com.bskj.common.service.IBaseService;

/**
 * @author lishi
 * @date 2017-11-29 下午4:04:10
 */
public interface IPayInfoService extends IBaseService<PayInfo> {
	/**
	 * 余额充值完成
	 *
	 * @param notifyMap 支付完成后第三方的回调参数
	 * @param joinActivity 是否参加活动
	 * @return 方法执行结果
	 * @throws Exception
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, Object> finishedBalancePay(Map<String, String> notifyMap, boolean joinActivity) throws Exception;

	/**
	 * 欠费充值完成
	 *
	 * @param notifyMap 支付完成后第三方的回调参数
	 * @return 方法执行结果
	 * @throws Exception
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, Object> finishedArrearsPay(Map<String, String> notifyMap) throws Exception;

	/**
	 * 统一下单
	 *
	 * @param
	 * @return
	 * @throws Exception
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, String> unifiedOrder(String appId, String openId, int userId, int totalFee, String ip, String notifyUrl)
			throws Exception;
	
	/**
	 * 无牌车支付下单
	 * 
	 * @param appId
	 * @param openId
	 * @param totalFee
	 * @param ip
	 * @param notifyUrl
	 * @return
	 * @throws Exception
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, String> noCarnoUnifiedOrder(String appId, String openId,Integer parkId, String ip, String notifyUrl)
			throws Exception;

	/**
	 * 无牌车支付回调
	 * 
	 * @param notifyMap
	 * @return
	 * @throws Exception
	 */
	@Transactional(rollbackFor = Exception.class)
	Map<String, String> noCarnoPayNotify(JSONObject notifyMap)throws Exception;
			
}
